#ifndef __Collections_KeyValuePair_H__
#define __Collections_KeyValuePair_H__

///<summary>
/// KeyValuePair<TKey, TValue>
///</summary>
#define Collections_KeyValuePair(TKey, TValue) bindT(Collections_KeyValuePair,TKey##TValue)
#define Declare_Collections_KeyValuePair(TKey, TiKey, TValue, TiValue) \
	public classT(Collections_KeyValuePair,TKey##TValue,System_Object, \
		private TKey key; \
		private TValue value; \
	); \
	Declare_CtorT(,protected,Collections_KeyValuePair,TKey##TValue, TiKey key, TiValue value)
#define Implement_Collections_KeyValuePair(TKey, TiKey, TValue, TiValue) \
	/*[ ToString ] */ \
	private_ char *ToString(System_Object *t) \
	{ \
		/* \
        Text_StringBuilder *builder = new(,Text_StringBuilder); \
        builder.Append('['); \
        if (t->key != null) \
        { \
            builder.Append(t->key.ToString()); \
        } \
        builder.Append(", "); \
        if (t->value != null) \
        { \
            builder.Append(t->value.ToString()); \
        } \
        builder.Append(']'); \
        return builder.ToString(); \
		*/ \
		return null; \
	} \
	Implement_TypeT(Collections_KeyValuePair,TKey##TValue,System_Object,, \
		System_ObjectVector *vtable = t.System_Object->__vtable; \
		vtable[_System_ObjectVIndex_ToString] = (System_ObjectVector)&ToString; \
	) \
	Implement_CtorT(,Collections_KeyValuePair,T, \
		baseCtor(,t,System_Object); \
		t->key = key; \
		t->value = value; \
	, TiKey key, TiValue value) \
	\
	/*[ Key ]*/ \
	public TiKey *spaceT(Collections_KeyValuePair,TKey##TValue,getKey)(Collections_KeyValuePair(TKey##TValue) *t) \
	{ \
		return t->key; \
	} \
	\
	/*[ Value ]*/ \
	public TiValue *spaceT(Collections_KeyValuePair,TKey##TValue,getValue)(Collections_KeyValuePair(TKey##TValue) *t) \
	{ \
		return t->value; \
	}

#endif /* __Collections_KeyValuePair_H__ */
